package com.wei.file.model;

import lombok.Data;

@Data
public class R {

    private int result;

    private String msg;


    private Object data;


    private R() {
    }

    public static R success(Object data) {
        R r = new R();
        r.result = 1;
        r.msg = "ok";
        r.data = data;
        return r;
    }

    public static R err(String msg) {
        R r = new R();
        r.result = 0;
        r.msg = msg;
        r.data = null;
        return r;
    }
}
